<?php

class Computer
{

    public $cpu = 'amd 5000';
    public $mainboard = '华硕9000x';
    private $hd = 500;
    const YES = true;
    const NO = false;
    const ONE = 1;


    public function __construct()
    {
        echo '<br/>';
        echo "cpu就绪。。。";
        echo "主板就绪.....";
        echo "高配的cup就绪...";
    }

    public function __destruct()
    {
        echo '<br/>';
        echo '析构函数被吊偶那个.....';
    }


    public function game($gameName = '')
    {
        if ($this->getHdSize() < 1024) {
            echo '<br/>';
            echo "硬盘太小万部了游戏";
            return false;
        }
        echo true;
    }

    public function job($work = '写代码')
    {
        echo $this->game();
    }

    private
    function getHdSize()
    {
        return $this->hd;
    }


}

$computer = new Computer();
$computer->game();












